<div style="text-align: center;">
<?php 

$year=1000;
echoYear($year, $this->year, $this);

for($year=1992; $year<=2010; $year++){
    echoYear($year, $this->year, $this);
}

?>    
     
</div>


<?php 

function echoYear($i, $year, $th){
        if($year == $i){
           if($i == 1000){
                echo $th->translate("All");
            }else{
                echo $i;
            } 
        }else{
            ?> 
             <a 
		    href="<?php
            echo $th->url(array('controller' => "friend", 'action' => 'year', 'request'=>$i),"default")?>">
            <?php if($i == 1000){
                echo $th->translate("All");
            }else{
                echo $i;
            }?> 
            </a> 
            <?php
                
        }
}
?>